<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      libjpeg-turbo-2.0.4
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;10.&nbsp;Graphics and Font Libraries
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="libgxps.html" title="Libgxps-0.3.1">Prev</a>
          <p>
            Libgxps-0.3.1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="libmng.html" title="libmng-2.0.3">Next</a>
          <p>
            libmng-2.0.3
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="graphlib.html" title=
          "Chapter&nbsp;10.&nbsp;Graphics and Font Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="libjpeg" name="libjpeg"></a>libjpeg-turbo-2.0.4
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to libjpeg-turbo
        </h2>
        <p>
          <span class="application">libjpeg-turbo</span> is a fork of the
          original IJG <span class="application">libjpeg</span> which uses
          SIMD to accelerate baseline JPEG compression and decompression.
          <span class="application">libjpeg</span> is a library that
          implements JPEG image encoding, decoding and transcoding.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-2.0.4.tar.gz">
                https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-2.0.4.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: d01d9e0c28c27bc0de9f4e2e8ff49855
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 2.1 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 31 MB (with tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.3 SBU (using parallelism=4; with
                tests)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          libjpeg-turbo Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="cmake.html" title=
          "CMake-3.17.0">CMake-3.17.0</a> and <a class="xref" href=
          "nasm.html" title="NASM-2.14.02">NASM-2.14.02</a> or <a class=
          "xref" href="yasm.html" title="yasm-1.3.0">yasm-1.3.0</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/libjpeg-turbo">http://wiki.linuxfromscratch.org/blfs/wiki/libjpeg-turbo</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of libjpeg-turbo
        </h2>
        <p>
          Install <span class="application">libjpeg-turbo</span> by running
          the following commands:
        </p>
        <pre class="userinput">
<kbd class="command">mkdir build &amp;&amp;
cd    build &amp;&amp;

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=RELEASE  \
      -DENABLE_STATIC=FALSE       \
      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.4 \
      -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib  \
      .. &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          test</strong></span>.
        </p>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            If installing <span class="application">libjpeg-turbo</span> over
            an older jpeg installation, not all library symbolic links are
            updated properly. To fix this before installation, run the
            following as the <code class="systemitem">root</code> user:
          </p>
          <pre class="root">
<kbd class="command">rm -f /usr/lib/libjpeg.so*</kbd>
</pre>
        </div>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <code class="option">-DWITH_JPEG8=ON</code>: This switch enables
          compatibility with <span class="application">libjpeg</span> version
          8.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">cjpeg, djpeg, jpegtran, rdjpgcom,
              tjbench, and wrjpgcom</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">libjpeg.so and libturbojpeg.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/share/doc/libjpeg-turbo-2.0.4</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="cjpeg" name="cjpeg"></a><span class=
                    "term"><span class=
                    "command"><strong>cjpeg</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    compresses image files to produce a JPEG/JFIF file on the
                    standard output. Currently supported input file formats
                    are: PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale
                    format), BMP, and Targa.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="djpeg" name="djpeg"></a><span class=
                    "term"><span class=
                    "command"><strong>djpeg</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    decompresses image files from JPEG/JFIF format to either
                    PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale
                    format), BMP, or Targa format.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="jpegtran" name="jpegtran"></a><span class=
                    "term"><span class=
                    "command"><strong>jpegtran</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used for lossless transformation of JPEG files.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="rdjpgcom" name="rdjpgcom"></a><span class=
                    "term"><span class=
                    "command"><strong>rdjpgcom</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    displays text comments from within a JPEG file.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="tjbench" name="tjbench"></a><span class=
                    "term"><span class=
                    "command"><strong>tjbench</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is used to benchmark the performance of libjpeg-turbo.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="wrjpgcom" name="wrjpgcom"></a><span class=
                    "term"><span class=
                    "command"><strong>wrjpgcom</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    inserts text comments into a JPEG file.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libjpeg-lib" name="libjpeg-lib"></a><span class=
                    "term"><code class="filename">libjpeg.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains functions used for reading and writing JPEG
                    images.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-19 01:44:08 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="libgxps.html" title="Libgxps-0.3.1">Prev</a>
          <p>
            Libgxps-0.3.1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="libmng.html" title="libmng-2.0.3">Next</a>
          <p>
            libmng-2.0.3
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="graphlib.html" title=
          "Chapter&nbsp;10.&nbsp;Graphics and Font Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
